package com.tocean.app.entity.sys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tocean.app.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 功能描述：系统权限
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName(value = "t_sys_permission")
public class Permission extends BaseEntity {

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 显示的图片
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 资源类型
     * [menu|button]
     */
    @TableField(value = "resource_type")
    private String resourceType;

    /**
     * 资源路径
     */
    @TableField(value = "url")
    private String url;

    /**
     * 权限字符串
     * menu例子：role:*
     * button例子：role:create,role:update,role:delete,role:view
     */
    @TableField(value = "permission")
    private String permission;

    /**
     * 父编号
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 父编号列表
     */
    @TableField(value = "parent_ids")
    private String parentIds;

}
